package com.zhou.controller;

import com.zhou.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author Mr.zhou
 */
@RestController
public class HelloController {

    @Autowired
    private TestService testService;
    @RequestMapping(value = "/hello", method = RequestMethod.GET)
    @ResponseBody
    public String hello(@RequestParam(name = "aa") String name) {
        testService.add(name);
        testService.update(name);
        testService.delete(name);
        testService.findOne(name);
        return "Hello " + name;
    }

}
